import Vue from 'vue'
import { axios} from './request'
export function erweima(url,ContentType,responseType) {
    return axios({
        url: url,
        method:'get' ,
        responseType:'Blob',
        headers:{}
    })
}
//post
export function postAction(url,parameter,ContentType) {
  return axios({
    url: url,
    method:'post' ,
    data: parameter,
    headers:ContentType
  })
}
//新增
export function postAction1(url,parameter,ContentType) {
  return axios({
    url: url,
    method:'post' ,
    data: parameter,
    headers:{
      "Content-Type":ContentType
    }
  })
}

//post method= {post | put}
export function httpAction(url,parameter,method) {
  return axios({
    url: url,
    method:method ,
    data: parameter
  })
}

//put //编辑
export function putAction(url,parameter) {
  return axios({
    url: url,
    method:'put',
    data: parameter
  })
}

//get  // 请求
export function getAction(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    params: parameter
  })
}
//get
export function getActionBody(url,parameter) {
  return axios({
    url: url,
    method: 'get',
    data: parameter
  })
}
//deleteAction  //删除
export function deleteAction(url,parameter) {
  return axios({
    url: url,
    method: 'delete',
    params: parameter
  })
}
